Newtons Method for Square roots

Published on: Mon Mar 15 2010

(pages 131 – 132 in text book) Set allowed Error variable
if guess2 –x < error { Square root found } guess = (x/guess + guess) /2 else, guess again…
Function must be written in line by line order, unless you write a header for the function above main. Use Function prototyping to avoid having to write your code in bottom up order.  Function prototyping is placing the header for the function above main. The .h files represent header files! only the functions actually included in your code are taken and inserted into your compiled code. You can restrict access to functions by prototyping a function inside of another function. Don’t actually write the function body into another function though.